<script setup lang="ts">
import {Perm} from "@/utils/enum-type";
import {useUserViewStore} from "@/store/views/sys/admin/userStore";

const store = useUserViewStore()
const {open, batchDelete} = store

</script>

<template>
  <x-card>
    <div class="my-space flex overflow-auto">
      <div v-perm="Perm.SysUserAdd">
        <!--    新增按钮-->
        <el-button type="success" @click="open()">
          <i-ep-plus/>
          <span>新增</span>
        </el-button>
      </div>
      <div v-perm="Perm.SysUserBatchDelete">
        <!--    批量删除按钮-->
        <el-button type="danger" plain @click="batchDelete()">
          <i-ep-delete/>
          <span>批量删除</span>
        </el-button>
      </div>
      <div v-perm="Perm.SysUserBatchSetRoles">
        <!--    批量分配按钮-->
        <el-button type="primary" plain>
          <i-ep-user/>
          <span>批量分配角色</span>
        </el-button>
      </div>
      <div v-perm="Perm.SysUserBatchRePassword">
        <!--    批量分配按钮-->
        <el-button plain>
          <i-ep-refresh/>
          <span>批量重置密码</span>
        </el-button>
      </div>
    </div>
  </x-card>
</template>
<style scoped lang="scss">
.my-space {
  > * + * {
    margin-left: 1em;
  }
}
</style>